package com.yj.timecapsule.controller.sms;

import com.yj.timecapsule.common.response.CommonResponseType;
import com.yj.timecapsule.service.sms.SmsService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sms-code")
public class SmsController {
    @Resource
    private SmsService smsService;
    @GetMapping("/send-for-login")
    public CommonResponseType<Object> sendForLogin(String phone) {
        smsService.sendCode(phone);
        return CommonResponseType.success();
    }
}
